<?php

namespace api\modules\app\models;

use Yii;

/**
 * This is the model class for table "deploy_detail".
 *
 * @property integer $id
 * @property integer $deploy_id
 * @property string $district
 * @property string $street
 * @property string $community_code
 * @property string $estate_code
 * @property string $grid_code
 * @property string $section
 * @property string $event_type1_code
 * @property string $event_type2_code
 * @property string $event_type3_code
 * @property string $unit_name_code
 * @property string $unit_code
 * @property integer $state
 */
class DeployDetail extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'deploy_detail';
    }

    /**
     * @return \yii\db\Connection the database connection used by this AR class.
     */
    public static function getDb()
    {
        return Yii::$app->get('test_3');
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['deploy_id', 'state'], 'integer'],
            [['district', 'street', 'grid_code', 'section', 'event_type1_code', 'event_type2_code', 'event_type3_code', 'unit_name_code', 'unit_code'], 'string', 'max' => 50],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'deploy_id' => 'Deploy ID',
            'district' => 'District',
            'street' => 'Street',
            'estate_code' => 'estate_code',
            'community_code' => 'community_code',
            'grid_code' => 'Grid Code',
            'section' => 'Section',
            'event_type1_code' => 'Event Type1 Code',
            'event_type2_code' => 'Event Type2 Code',
            'event_type3_code' => 'Event Type3 Code',
            'unit_name_code' => 'Unit Name Code',
            'unit_code' => 'Unit Code',
            'state' => 'State',
        ];
    }
}
